﻿* Encoding: UTF-8.


***Figure 1 numbers

*Use Brexitidentitydata1 

WEIGHT BY weightfinal.

CROSSTABS
  /TABLES=Wave BY eurefid1
  /FORMAT=AVALUE TABLES
  /CELLS=COUNT
  /COUNT ROUND CELL.


***Numbers in FN 1

*Use Brexitidentitydata1  

WEIGHT BY weightfinal.
    
USE ALL.
COMPUTE filter_$=(EUrefvote < 3).
FILTER BY filter_$.
EXECUTE.

CROSSTABS
  /TABLES=Wave BY eurefid1
  /FORMAT=AVALUE TABLES
  /CELLS=ROW 
  /COUNT ROUND CELL.


***Table 1 numbers

*Use Brexitidentitydata1 

WEIGHT BY weightfinal.

USE ALL.
COMPUTE filter_$=(Wave = 11 | Wave = 17).
FILTER BY filter_$.
EXECUTE.
    
MEANS TABLES=BrexattachAll BY eurefid1 BY Wave
  /CELLS=MEAN .

*Use Brexitidentitydata2 

WEIGHT BY weight.

MEANS TABLES=BrexattachAll BY eurefid1
  /CELLS=MEAN .
MEANS TABLES=pidattachAll BY partyid
  /CELLS=MEAN .


***Numbers in text on identity strength

*Use Brexitidentitydata1 

WEIGHT BY weightfinal.

USE ALL.
COMPUTE filter_$=(Wave = 17).
FILTER BY filter_$.
EXECUTE.
    
CROSSTABS
  /TABLES= eurefid1 BY Brexstrength 
    /FORMAT=AVALUE TABLES
  /CELLS=ROW 
  /COUNT ROUND CELL.

CROSSTABS
  /TABLES= pid1 BY pid1a 
    /FORMAT=AVALUE TABLES
  /CELLS=ROW 
  /COUNT ROUND CELL.

CROSSTABS
  /TABLES= pid1 BY pid1b 
    /FORMAT=AVALUE TABLES
  /CELLS=ROW 
  /COUNT ROUND CELL.


***Numbers in text on economic perceptions

*Use Brexitidentitydata1 

WEIGHT BY weightfinal.
 
CROSSTABS
  /TABLES=eurefid1 BY hobolt24 BY pid1
  /FORMAT=AVALUE TABLES
  /CELLS=ROW 
  /COUNT ROUND CELL.


***Figure 2

*Use Brexitidentitydata3 

WEIGHT BY w8.
 
USE ALL.
COMPUTE filter_$=(BrexN1=1 & BrexN2<3 ).
FILTER BY filter_$.
EXECUTE.

MEANS TABLES=BrexN3_1 BrexN3_2 BrexN3_3 BrexN3_4 BrexN3_6 BrexN3_7 BrexN3_8 BrexN3_9 BrexN3_10 BY BrexN2
  /CELLS=MEAN.

USE ALL.
COMPUTE filter_$=(BrexN1=2 & BrexN2<3 ).
FILTER BY filter_$.
EXECUTE.

MEANS TABLES=BrexN3_1 BrexN3_2 BrexN3_3 BrexN3_4 BrexN3_6 BrexN3_7 BrexN3_8 BrexN3_9 BrexN3_10 BY BrexN2
  /CELLS=MEAN.


***Figure 3

*Use Brexitidentitydata4 

WEIGHT BY w8.
 
MEANS TABLES=BrexN3_leavecon_1 BrexN3_leavecon_2 BrexN3_leavecon_3 BrexN3_leavecon_4 BrexN3_leavecon_6 BrexN3_leavecon_7 BrexN3_leavecon_8 BrexN3_leavecon_9 BrexN3_leavecon_10
  /CELLS=MEAN.
MEANS TABLES=BrexN3_remaincon_1 BrexN3_remaincon_2 BrexN3_remaincon_3 BrexN3_remaincon_4 BrexN3_remaincon_6 BrexN3_remaincon_7 BrexN3_remaincon_8 BrexN3_remaincon_9 BrexN3_remaincon_10
  /CELLS=MEAN.
MEANS TABLES=BrexN3_leavelab_1 BrexN3_leavelab_2 BrexN3_leavelab_3 BrexN3_leavelab_4 BrexN3_leavelab_6 BrexN3_leavelab_7 BrexN3_leavelab_8 BrexN3_leavelab_9 BrexN3_leavelab_10
  /CELLS=MEAN.
MEANS TABLES=BrexN3_remainlab_1 BrexN3_remainlab_2 BrexN3_remainlab_3 BrexN3_remainlab_4 BrexN3_remainlab_6 BrexN3_remainlab_7 BrexN3_remainlab_8 BrexN3_remainlab_9 BrexN3_remainlab_10
  /CELLS=MEAN.


***Table 2

*Use Brexitidentitydata5 
 
RECODE
 BrexG1c
  (1 thru 5=copy) (else=99) INTO Immig.
VARIABLE LABELS Immig 'Immigration support'.
VALUE LABELS Immig (1)Dislike immigration (5)Like immigration (99)Missing.
EXECUTE .
RECODE
 BrexG2c
  (1 thru 5=copy) INTO immig.
EXECUTE .
   
 RECODE
 BrexG1a
  (1=1) (2=2) (3 thru 4=3) (else=99) INTO EUID.
VARIABLE LABELS EUID 'EU identity'.
VALUE LABELS EUID (1)Leaver (2)Remainer (3)Neither (99)Missing.
EXECUTE .
RECODE
 BrexG2a
  (1=1) (2=2) (3 thru 4=3) INTO EUID.
EXECUTE .

RECODE
 splitnumber
  (1=3) (2=1) (3=2) (else=99) INTO Treat.
VARIABLE LABELS treat 'Treatment'.
VALUE LABELS treat (1)BID cue (3)Control (99)Missing.
EXECUTE .

USE ALL.
COMPUTE filter_$=(euid=1 ).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=Treat(1 3)
  /MISSING=ANALYSIS
  /VARIABLES=Immig
  /CRITERIA=CI(.95).

USE ALL.
COMPUTE filter_$=(euid=2 ).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=Treat(1 3)
  /MISSING=ANALYSIS
  /VARIABLES=Immig
  /CRITERIA=CI(.95).
